package com.central.scheduler.dao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.central.common.model.WorkerServer;
import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.MasterServer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author Tindy
 * @date 2021/7/3
 * @describe
 */
@Mapper
public interface WorkerServerMapper extends SuperMapper<WorkerServer> {
    List<WorkerServer> findWorkers(Page<WorkerServer> page,@Param("u") Map<String, Object> params);

    List<WorkerServer> findWorkersByPro(Page<WorkerServer> page, @Param("u") Map<String, Object> params,@Param("proId") Long proId);

    @Select("select * from sch_worker_server where host=#{host}")
    WorkerServer findByHost(@Param("host") String host);
}